home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group96a.txt / 000140_icon-group-sender _Tue Jun 18 11:15:06 1996.msg < prev    next >
Internet Message Format  |  1996-09-05  |  2KB

  1. Received: by cheltenham.cs.arizona.edu; Tue, 18 Jun 1996 13:13:27 MST
  2. Message-Id: <199606181615.MAA06057@po_box.cig.mot.com>
  3. Date: Tue, 18 Jun 1996 11:15:06 -0500
  4. From: Tony J Yeates <yeates@cig.mot.com>
  5. In-Reply-To: Hamish Lawson <H.Lawson@tees.ac.uk>
  6.         "Re: Locking files" (Jun 18,  1:11pm)
  7. References: <9606140653.AA00140@canardo.unicaen.fr> 
  8.     <199606181601.MAA05191@po_box.cig.mot.com>
  9. X-Mailer: Z-Mail (3.2.1 10apr95)
  10. To: Hamish Lawson <H.Lawson@tees.ac.uk>, icon-group@cs.arizona.edu
  11. Subject: Re: Locking files
  12. Mime-Version: 1.0
  13. Content-Type: text/plain; charset=us-ascii
  14. Errors-To: icon-group-errors@cs.arizona.edu
  15. Status: O
  16.  
  17. On Jun 18,  1:11pm, Hamish Lawson wrote:
  18. > Subject: Re: Locking files
  19. > Jerzy Karczmarczuk wrote:
  20. >
  21. > > there is a cheap way of locking something
  22. > > globally used for ages: the *creation* of a special "lock" file
  23. > > just before entering the critical section (if it is absent,
  24. > > otherwise sleep/wait), and the destruction after.
  25. >
  26. > Is there not a small risk that in the time between some process finding
  27. > that the lock file doesn't exist and creating this file, another process
  28. > might also find that the lock file doesn't exist, thereby breaking the
  29. > exclusivity mechanism.
  30. >
  31. > | Hamish Lawson, School of Computing and Mathematics,
  32. > | University of Teesside, Middlesbrough, Cleveland, UK, TS1 3BA
  33. > | Tel: +44 1642 212695  Fax: +44 1642 342604
  34. > | E-mail: H.Lawson@tees.ac.uk
  35. >
  36. >-- End of excerpt from Hamish Lawson
  37.  
  38. Hopefully the OS would enforce:
  39.  
  40. 1) uniqueness of a filename within a directory (normal but nes. true
  41. for all conceivable OS's I guess)
  42.  
  43. 2) atomic file creation.
  44.